home *** CD-ROM | disk | FTP | other *** search
/ Buzz 5 / Buzz 5.adf / Buzz Installer next >
Text File  |  1994-12-28  |  3KB  |  143 lines

  1. ; $VER: Defiance: Buzz Issue 5 26/12/94
  2. ; Installer Revision 2 14/11/94
  3. ; Copyright (C) Defiance
  4.  
  5. ; ### VARIABLES
  6. ;** The amount of space needed on the hard disk to install
  7. (set EssentialHDSpace 1)
  8. ; ### INSTALL DISK NAMES
  9. (set #DocDefaultTool "Buzz")
  10. (set #Install1Disk "Buzz_5")
  11. (set #ProgName
  12. (cat "Buzz"
  13. ))
  14. (set #HardDiskWorkingMsg
  15. (cat "\n\n\n\nPlease wait...\n\n" #ProgName " is being installed to your hard disk."
  16. ))
  17. (set #NoDiskSpaceMsg1
  18. (cat "\n\n\n\nThere is insufficient available space on your hard disk to install "
  19.     #ProgName ". You will need a minimum of "
  20. ))
  21. (set #NoDiskSpaceMsg2
  22. (cat "MB of free disk space.\n\nEither click \"Abort Install\" to exit this "
  23.     "installation and delete some files from your hard disk, or click \"Proceed\" and try a "
  24.     "different partition."
  25. ))
  26. (set #HardDiskDestChoiceMsg
  27. (cat "Where do you want to install " #ProgName "?"
  28. ))
  29. (set #HardDiskDestChoiceHelp
  30. (cat "Select the drawer where you want to install " #ProgName ", then click Proceed."
  31. ))
  32. (set #Welcome
  33. (cat "\n\n\n\nWelcome to the " #ProgName " installer.\n\n"
  34.     "Copyright (C) 1994 Defiance.\n\n\n\n"
  35.     "Buzz was written by Slaze/Defiance! "
  36. ))
  37. (set #InsertDiskMsg
  38. (cat "\n\n\n\n\nPlease insert the disk labelled\n\n"
  39. ))
  40. (set #diskhelp
  41.     (cat "\nIf you know that the correct disk is in the drive, but you still cannot proceed, "
  42.         "then the name of the disk is incorrect.\n"
  43.         "Ensure that the disk name is not preceded by 'copy_of_', or blank spaces before or after the disk name.\n\n\n" @askdisk-help
  44.     )
  45. )
  46.  
  47. ; ### PROCEDURE DEFINITIONS
  48.  
  49. ;** routine to get disk specified in '#FileSourceDisk'
  50. (procedure @GetDisk
  51.     (
  52.         (askdisk
  53.             (prompt #InsertDiskMsg #FileSourceDisk)
  54.             (help #diskhelp)
  55.             (dest #FileSourceDisk)
  56.         )
  57.     )
  58. )
  59.  
  60. ;** Procedure to choose the hard disk destination
  61. (procedure @FindHDDest
  62. (
  63. (@ChooseHDDest)
  64.     (while (< (getdiskspace #DestDrawer) HDSpaceNeededBytes)
  65.         (
  66.             (if (< (getdiskspace #DestDrawer) HDSpaceNeededBytes)
  67.                 (
  68.                     (if (= @user-level 0)
  69.                         (
  70.                             (user 2)
  71.                             (set #UserNovice 1)
  72.                         )
  73.                     )
  74.                 (message #NoDiskSpaceMsg1 (/ (/ HDSpaceNeededBytes 512) 512) #NoDiskSpaceMsg2)
  75.                 (@ChooseHDDest)
  76.                 )
  77.             )
  78.         )
  79.     ) ;end while
  80.     (if (= #UserNovice 1)
  81.         (
  82.             (user 0)
  83.         )
  84.     )
  85. ))
  86.  
  87. (procedure @ChooseHDDest
  88. (
  89.     ;** Find default drawer
  90.     (set #DefaultDest (getassign "Work" "d"))
  91.         (if (= #DefaultDest "")
  92.         (
  93.             (set #DefaultDest (getassign "SYS:" "d"))
  94.         )
  95.         )
  96.     ;** Ask for destination
  97.     (set #DestDrawer
  98.         (askdir
  99.             (prompt #HardDiskDestChoiceMsg)
  100.             (help #HardDiskDestChoiceHelp)
  101.         (default #DefaultDest)
  102.         )
  103.     )
  104. ))
  105.  
  106. (welcome)
  107. (message #Welcome)
  108.  
  109. (set #DestDrawer "")
  110. (set HDSpaceNeededBytes (+ (* (* EssentialHDSpace 512) 512) TotalSpace))
  111. (@FindHDDest)          ;ask for destination drawer
  112. (set #FileSourceDisk #Install1Disk)
  113. (@GetDisk)
  114. (working #HardDiskWorkingMsg)
  115. (copyfiles
  116.     (source (cat #Install1Disk ":Libs"))
  117.     (dest (cat #DestDrawer ))
  118.     (pattern "PowerPacker.library")
  119.     (optional "force")
  120. )
  121. (copyfiles
  122.     (source (cat #Install1Disk ":"))
  123.     (dest (cat #DestDrawer ))
  124.     (pattern "Type")
  125.     (optional "force")
  126. )
  127. (copyfiles
  128.     (source (cat #Install1Disk ":"))
  129.     (dest (cat #DestDrawer ))
  130.     (pattern "IconX")
  131.     (optional "force")
  132. )
  133. (copyfiles
  134.     (source (cat #Install1Disk ":"))
  135.     (dest (cat #DestDrawer ))
  136.     (pattern "*.*")
  137.     (optional "force")
  138. )
  139.  
  140. (rename (cat #DestDrawer "/Buzz.hd") (cat #DestDrawer "/Buzz"))
  141. (delete (cat #DestDrawer "/Install Buzz.info") (cat #DestDrawer "/Disk.info"))
  142. (complete 100)
  143.